<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>opennars: aruntime/src/main/java/nars/language/Term.java Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtreedata.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">opennars
   &#160;<span id="projectnumber">1.5.5</span>
   </div>
   <div id="projectbrief">1.5-ish</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="../../namespaces.html"><span>Packages</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="../../files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('d8/df2/Term_8java_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Term.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="../../d8/df2/Term_8java.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Term.java</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (C) 2008  Pei Wang</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * This file is part of Open-NARS.</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * Open-NARS is free software; you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * the Free Software Foundation, either version 2 of the License, or</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * Open-NARS is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * along with Open-NARS.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">package </span>nars.language;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">import</span> inc.glamdring.vtables._edge;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">import</span> inc.glamdring.vtables._ptr;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">import</span> inc.glamdring.vtables._reifier;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">import</span> <a class="code" href="../../d7/d81/namespacenars.html">nars</a>.data.TermStruct;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">import</span> prauto.<a class="code" href="../../db/d64/namespacenars_1_1io.html">io</a>.PackedPayload;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">import</span> java.nio.ByteBuffer;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">import</span> <span class="keyword">static</span> bbcursive.std.*;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term.html">   40</a></span>&#160;<span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> <span class="keyword">implements</span> Cloneable, Comparable&lt;Term&gt;, TermStruct {</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a059f44677d4580c0eef198dfba957b6b.html#a059f44677d4580c0eef198dfba957b6b">   46</a></span>&#160;    <span class="keyword">protected</span> String <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a059f44677d4580c0eef198dfba957b6b.html#a059f44677d4580c0eef198dfba957b6b">name</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a2d9973aada6190dd60b48a34448094c9.html#a2d9973aada6190dd60b48a34448094c9">   51</a></span>&#160;    <span class="keyword">protected</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a2d9973aada6190dd60b48a34448094c9.html#a2d9973aada6190dd60b48a34448094c9">Term</a>() {</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    }</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a5349525349f10c420ab52baa8e188ec9.html#a5349525349f10c420ab52baa8e188ec9">   59</a></span>&#160;    <span class="keyword">public</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a5349525349f10c420ab52baa8e188ec9.html#a5349525349f10c420ab52baa8e188ec9">Term</a>(String name) {</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        this.name = <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a059f44677d4580c0eef198dfba957b6b.html#a059f44677d4580c0eef198dfba957b6b">name</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    }</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db.html#a3aad4654016b8615fd4fa8a26668e1db">   68</a></span>&#160;    <span class="keyword">public</span> String <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db.html#a3aad4654016b8615fd4fa8a26668e1db">getName</a>() {</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a059f44677d4580c0eef198dfba957b6b.html#a059f44677d4580c0eef198dfba957b6b">name</a>;</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    }</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    @Override</div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_ac1ce5f0c9b7be90731070f8a92b8d6e8.html#ac1ce5f0c9b7be90731070f8a92b8d6e8">   73</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ac1ce5f0c9b7be90731070f8a92b8d6e8.html#ac1ce5f0c9b7be90731070f8a92b8d6e8">setName</a>(String $name$) {</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        name = $name$;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    }</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    @Override</div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_ae2dba162b71bb9b806f54832249a260c.html#ae2dba162b71bb9b806f54832249a260c">   83</a></span>&#160;    <span class="keyword">public</span> Object <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ae2dba162b71bb9b806f54832249a260c.html#ae2dba162b71bb9b806f54832249a260c">clone</a>() {</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a2d9973aada6190dd60b48a34448094c9.html#a2d9973aada6190dd60b48a34448094c9">Term</a>(name);</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    }</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    @Override</div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f.html#ad85f45a7858737445d5158801774ff5f">   94</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">boolean</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f.html#ad85f45a7858737445d5158801774ff5f">equals</a>(Object that) {</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordflow">return</span> (that instanceof <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a>) &amp;&amp; name.equals(((Term) that).<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db.html#a3aad4654016b8615fd4fa8a26668e1db">getName</a>());</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    }</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    @Override</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a932a75d46661c14589d7c924dd03de7b.html#a932a75d46661c14589d7c924dd03de7b">  104</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a932a75d46661c14589d7c924dd03de7b.html#a932a75d46661c14589d7c924dd03de7b">hashCode</a>() {</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keywordflow">return</span> (name != null ? name.hashCode() : 7);</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    }</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a88297bdbbfb5f3e292783647b14f0c70.html#a88297bdbbfb5f3e292783647b14f0c70">  113</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">boolean</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a88297bdbbfb5f3e292783647b14f0c70.html#a88297bdbbfb5f3e292783647b14f0c70">isConstant</a>() {</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    }</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a6ad164dd053a9cc808bcd6a2d741a775.html#a6ad164dd053a9cc808bcd6a2d741a775">  120</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">void</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a6ad164dd053a9cc808bcd6a2d741a775.html#a6ad164dd053a9cc808bcd6a2d741a775">renameVariables</a>() {</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    }</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a.html#ae14632d1d25bcde8d6698ea0b58eb19a">  128</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">int</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a.html#ae14632d1d25bcde8d6698ea0b58eb19a">getComplexity</a>() {</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    }</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_ab9bc1c9cc779c07b09983b41ed8491e1.html#ab9bc1c9cc779c07b09983b41ed8491e1">  138</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">final</span> <span class="keywordtype">int</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ab9bc1c9cc779c07b09983b41ed8491e1.html#ab9bc1c9cc779c07b09983b41ed8491e1">compareTo</a>(<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> that) {</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="keywordflow">return</span> name.compareTo(that.<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db.html#a3aad4654016b8615fd4fa8a26668e1db">getName</a>());</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a3ccce1edc19747abeed12118b33bcf50.html#a3ccce1edc19747abeed12118b33bcf50">  148</a></span>&#160;    <span class="keyword">public</span> <span class="keywordtype">boolean</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a3ccce1edc19747abeed12118b33bcf50.html#a3ccce1edc19747abeed12118b33bcf50">containTerm</a>(<a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> target) {</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f.html#ad85f45a7858737445d5158801774ff5f">equals</a>(target);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    }</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    @Override</div>
<div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="../../d8/db8/classnars_1_1language_1_1Term_a04fc046ba98c451bded562f79cff4244.html#a04fc046ba98c451bded562f79cff4244">  158</a></span>&#160;    <span class="keyword">public</span> <span class="keyword">final</span> String <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a04fc046ba98c451bded562f79cff4244.html#a04fc046ba98c451bded562f79cff4244">toString</a>() {</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term_a059f44677d4580c0eef198dfba957b6b.html#a059f44677d4580c0eef198dfba957b6b">name</a>;</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    }</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;}</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="../../d3/d77/classnars_1_1language_1_1PascalStringReifier.html">  168</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d3/d77/classnars_1_1language_1_1PascalStringReifier.html">PascalStringReifier</a> <span class="keyword">implements</span> _reifier&lt;String&gt; {</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    @Override</div>
<div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="../../d3/d77/classnars_1_1language_1_1PascalStringReifier_a9e18fbb00a9ae5a78ae2f145add07626.html#a9e18fbb00a9ae5a78ae2f145add07626">  170</a></span>&#160;    <span class="keyword">public</span> String <a class="code" href="../../d3/d77/classnars_1_1language_1_1PascalStringReifier_a9e18fbb00a9ae5a78ae2f145add07626.html#a9e18fbb00a9ae5a78ae2f145add07626">apply</a>(_ptr ptr) {</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        ByteBuffer core = ptr.core();</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <span class="keywordtype">int</span> i = core.get() &amp; 0xff;</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        String str = str(bb(core, ByteBuffer::duplicate, ByteBuffer::slice, lim(i)));</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        bb(core, pos(core.position() + i));</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordflow">return</span> str;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    }</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;}</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div>
<div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="../../da/d9c/classnars_1_1language_1_1TermStringCursor.html">  185</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../da/d9c/classnars_1_1language_1_1TermStringCursor.html">TermStringCursor</a> <span class="keyword">implements</span> _reifier&lt;Term&gt; {</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    @Override</div>
<div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="../../da/d9c/classnars_1_1language_1_1TermStringCursor_a759bc0c6749fceb4b54e32c29c4fa70c.html#a759bc0c6749fceb4b54e32c29c4fa70c">  198</a></span>&#160;    <span class="keyword">public</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a> <a class="code" href="../../da/d9c/classnars_1_1language_1_1TermStringCursor_a759bc0c6749fceb4b54e32c29c4fa70c.html#a759bc0c6749fceb4b54e32c29c4fa70c">apply</a>(_ptr ptr) {</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        _edge&lt;_edge&lt;Term, PascalStringReifier&gt;, _ptr&gt; term_edge_edge = <span class="keyword">new</span> _edge&lt;_edge&lt;Term, PascalStringReifier&gt;, _ptr&gt;() {</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            @Override</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;            <span class="keyword">protected</span> _ptr at() {</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;                <span class="keywordflow">return</span> ptr;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;            }</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            @Override</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            <span class="keyword">protected</span> _ptr goTo(_ptr ptr) {</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;                bb(location().core(ptr), pos(location().location(ptr)));</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;                <span class="keywordflow">return</span> ptr;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;            }</div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            @Override</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            <span class="keyword">protected</span> _ptr r$() {</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;                <span class="keywordflow">return</span> ptr;</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;            }</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        };</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        String reified = term_edge_edge.core().location().apply(ptr);</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d8/db8/classnars_1_1language_1_1Term.html">Term</a>(reified);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    }</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;}</div>
<div class="ttc" id="classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db_html_a3aad4654016b8615fd4fa8a26668e1db"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a3aad4654016b8615fd4fa8a26668e1db.html#a3aad4654016b8615fd4fa8a26668e1db">nars.language.Term.getName</a></div><div class="ttdeci">String getName()</div><div class="ttdoc">Reporting the name of the current Term. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00068">Term.java:68</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a2d9973aada6190dd60b48a34448094c9_html_a2d9973aada6190dd60b48a34448094c9"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a2d9973aada6190dd60b48a34448094c9.html#a2d9973aada6190dd60b48a34448094c9">nars.language.Term.Term</a></div><div class="ttdeci">Term()</div><div class="ttdoc">Default constructor that build an internal Term. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00051">Term.java:51</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a5349525349f10c420ab52baa8e188ec9_html_a5349525349f10c420ab52baa8e188ec9"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a5349525349f10c420ab52baa8e188ec9.html#a5349525349f10c420ab52baa8e188ec9">nars.language.Term.Term</a></div><div class="ttdeci">Term(String name)</div><div class="ttdoc">Constructor with a given name. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00059">Term.java:59</a></div></div>
<div class="ttc" id="namespacenars_1_1io_html"><div class="ttname"><a href="../../db/d64/namespacenars_1_1io.html">nars.io</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d26/ExperienceReader_8java_source.html#l00021">ExperienceReader.java:21</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a_html_ae14632d1d25bcde8d6698ea0b58eb19a"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_ae14632d1d25bcde8d6698ea0b58eb19a.html#ae14632d1d25bcde8d6698ea0b58eb19a">nars.language.Term.getComplexity</a></div><div class="ttdeci">int getComplexity()</div><div class="ttdoc">The syntactic complexity, for constant automic Term, is 1. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00128">Term.java:128</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_ae2dba162b71bb9b806f54832249a260c_html_ae2dba162b71bb9b806f54832249a260c"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_ae2dba162b71bb9b806f54832249a260c.html#ae2dba162b71bb9b806f54832249a260c">nars.language.Term.clone</a></div><div class="ttdeci">Object clone()</div><div class="ttdoc">Make a new Term with the same name. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00083">Term.java:83</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a932a75d46661c14589d7c924dd03de7b_html_a932a75d46661c14589d7c924dd03de7b"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a932a75d46661c14589d7c924dd03de7b.html#a932a75d46661c14589d7c924dd03de7b">nars.language.Term.hashCode</a></div><div class="ttdeci">int hashCode()</div><div class="ttdoc">Produce a hash code for the term. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00104">Term.java:104</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a059f44677d4580c0eef198dfba957b6b_html_a059f44677d4580c0eef198dfba957b6b"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a059f44677d4580c0eef198dfba957b6b.html#a059f44677d4580c0eef198dfba957b6b">nars.language.Term.name</a></div><div class="ttdeci">String name</div><div class="ttdoc">A Term is identified uniquely by its name, a sequence of characters in a given alphabet (ASCII or Uni...</div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00046">Term.java:46</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a04fc046ba98c451bded562f79cff4244_html_a04fc046ba98c451bded562f79cff4244"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a04fc046ba98c451bded562f79cff4244.html#a04fc046ba98c451bded562f79cff4244">nars.language.Term.toString</a></div><div class="ttdeci">final String toString()</div><div class="ttdoc">The same as getName by default, used in display only. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00158">Term.java:158</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_ac1ce5f0c9b7be90731070f8a92b8d6e8_html_ac1ce5f0c9b7be90731070f8a92b8d6e8"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_ac1ce5f0c9b7be90731070f8a92b8d6e8.html#ac1ce5f0c9b7be90731070f8a92b8d6e8">nars.language.Term.setName</a></div><div class="ttdeci">void setName(String $name $)</div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00073">Term.java:73</a></div></div>
<div class="ttc" id="namespacenars_html"><div class="ttname"><a href="../../d7/d81/namespacenars.html">nars</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1PascalStringReifier_html"><div class="ttname"><a href="../../d3/d77/classnars_1_1language_1_1PascalStringReifier.html">nars.language.PascalStringReifier</a></div><div class="ttdoc">for argument&#39;s sake, we encode as bounded pascal strings </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00168">Term.java:168</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f_html_ad85f45a7858737445d5158801774ff5f"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_ad85f45a7858737445d5158801774ff5f.html#ad85f45a7858737445d5158801774ff5f">nars.language.Term.equals</a></div><div class="ttdeci">boolean equals(Object that)</div><div class="ttdoc">Equal terms have identical name, though not necessarily the same reference. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00094">Term.java:94</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a88297bdbbfb5f3e292783647b14f0c70_html_a88297bdbbfb5f3e292783647b14f0c70"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a88297bdbbfb5f3e292783647b14f0c70.html#a88297bdbbfb5f3e292783647b14f0c70">nars.language.Term.isConstant</a></div><div class="ttdeci">boolean isConstant()</div><div class="ttdoc">Check whether the current Term can name a Concept. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00113">Term.java:113</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a3ccce1edc19747abeed12118b33bcf50_html_a3ccce1edc19747abeed12118b33bcf50"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a3ccce1edc19747abeed12118b33bcf50.html#a3ccce1edc19747abeed12118b33bcf50">nars.language.Term.containTerm</a></div><div class="ttdeci">boolean containTerm(Term target)</div><div class="ttdoc">Recursively check if a compound contains a term. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00148">Term.java:148</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1TermStringCursor_html"><div class="ttname"><a href="../../da/d9c/classnars_1_1language_1_1TermStringCursor.html">nars.language.TermStringCursor</a></div><div class="ttdoc">this says add pointer, get a Term </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00185">Term.java:185</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_html"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term.html">nars.language.Term</a></div><div class="ttdoc">Term is the basic component of Narsese, and the object of processing in NARS. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00040">Term.java:40</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1PascalStringReifier_a9e18fbb00a9ae5a78ae2f145add07626_html_a9e18fbb00a9ae5a78ae2f145add07626"><div class="ttname"><a href="../../d3/d77/classnars_1_1language_1_1PascalStringReifier_a9e18fbb00a9ae5a78ae2f145add07626.html#a9e18fbb00a9ae5a78ae2f145add07626">nars.language.PascalStringReifier.apply</a></div><div class="ttdeci">String apply(_ptr ptr)</div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00170">Term.java:170</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1TermStringCursor_a759bc0c6749fceb4b54e32c29c4fa70c_html_a759bc0c6749fceb4b54e32c29c4fa70c"><div class="ttname"><a href="../../da/d9c/classnars_1_1language_1_1TermStringCursor_a759bc0c6749fceb4b54e32c29c4fa70c.html#a759bc0c6749fceb4b54e32c29c4fa70c">nars.language.TermStringCursor.apply</a></div><div class="ttdeci">Term apply(_ptr ptr)</div><div class="ttdoc">"_reifier" is specific to ByteBuffer/int pairs. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00198">Term.java:198</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_ab9bc1c9cc779c07b09983b41ed8491e1_html_ab9bc1c9cc779c07b09983b41ed8491e1"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_ab9bc1c9cc779c07b09983b41ed8491e1.html#ab9bc1c9cc779c07b09983b41ed8491e1">nars.language.Term.compareTo</a></div><div class="ttdeci">final int compareTo(Term that)</div><div class="ttdoc">Check the relative order of two Terms. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00138">Term.java:138</a></div></div>
<div class="ttc" id="classnars_1_1language_1_1Term_a6ad164dd053a9cc808bcd6a2d741a775_html_a6ad164dd053a9cc808bcd6a2d741a775"><div class="ttname"><a href="../../d8/db8/classnars_1_1language_1_1Term_a6ad164dd053a9cc808bcd6a2d741a775.html#a6ad164dd053a9cc808bcd6a2d741a775">nars.language.Term.renameVariables</a></div><div class="ttdeci">void renameVariables()</div><div class="ttdoc">Blank method to be override in CompoundTerm. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/df2/Term_8java_source.html#l00120">Term.java:120</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_ed82ebcd34e530b246c6fd9032262140.html">aruntime</a></li><li class="navelem"><a class="el" href="../../dir_19496ddff8e6c0f2b6654287ecb1a472.html">src</a></li><li class="navelem"><a class="el" href="../../dir_db9c5934f797909f7296c2c2017f7fc9.html">main</a></li><li class="navelem"><a class="el" href="../../dir_6d74390eb6d6287951075e525bcb9bed.html">java</a></li><li class="navelem"><a class="el" href="../../dir_51a24984472456d47100350cd31f9a7c.html">nars</a></li><li class="navelem"><a class="el" href="../../dir_b4d9c5ced2c21fe4bf332c675d1d2c5f.html">language</a></li><li class="navelem"><a class="el" href="../../d8/df2/Term_8java.html">Term.java</a></li>
    <li class="footer">Generated on Sun Jan 10 2016 18:03:58 for opennars by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
